This example starts Milestones Professional, creates a new file, adds a symbol on task row 1, and then saves the file under file name: "Test File From VBA.MLP"
|
Public Sub Example3() Set objMilestones = CreateObject ("Milestones") With objMilestones .AddSymbol 1, "11/12/2023", 2 nFileHandleVariant = 0 nFileHandleVariant = .Save("c:\myfiles\"+ "Test File From VBG.MLP") nFileHandleInt = nFileHandleVariant If (nFileHandleInt = 0) Then MsgBox "File Save Failed" End If End With Exit sub end sub |
|
Notes:
In this example the .CreateObject command causes Milestones to start and create a new schedule.
The path to the Milestones Professional charts folder is obtained from the miles.ini that is created in the Windows folder when Milestones Professional is installed.
The complete path and file name, including the .MLP file extension must be included on the .Save Command.
Passing a bad file name or path to the .Save command causes Milestones to display an error dialog box.
Visit the KIDASA Software programmer's page for more examples
visit our programmer's page for more examples
Related Topics
To effectively program with this interface, it's important to learn all about Milestones Professional. Learn about Milestones.
Milestones Professional 2025 Automation Methods and Properties. © Copyright 2000-2025, KIDASA Software, Inc. All rights reserved.